import math

if __name__ == '__main__':
    x = 343720
    y = 233333
    dx = 15
    dy = 17
    d = math.gcd(y * dx, x * dy)  # print(d) 3305
    k1 = y * dx / d  # print(k1)  # 1059
    t = 2 * x * k1 / dx  # print(t)  # 48533264

    s = math.sqrt(t ** 2 * (dx ** 2 + dy ** 2))
    print(s)  # 1100325199.770395
